Conversation
Allow passing `-target wasm` when using a Wasm cross-jit.
There was a problem hiding this comment.
Pull request overview
This PR adds WebAssembly (WASM) as a valid SPMI (Super PMI - a JIT testing tool) target architecture, enabling cross-compilation support for wasm/wasm32/wasm64 targets. The changes extend the existing architecture enumeration, command-line parsing, and target matching logic to recognize WebAssembly platforms.
Key changes:
- Added WASM32 and WASM64 to the SPMI target architecture enumeration and classification functions
- Extended command-line parsing to accept "wasm", "wasm32", and "wasm64" as valid target values
- Updated architecture matching logic to support WASM32 (note: WASM64 support is incomplete)
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/coreclr/tools/superpmi/superpmi-shared/spmiutil.h | Adds WASM32 and WASM64 enum values and updates 32-bit/64-bit architecture helper functions |
| src/coreclr/tools/superpmi/superpmi-shared/spmiutil.cpp | Adds TARGET_WASM32 and TARGET_WASM64 preprocessor conditionals for default architecture initialization |
| src/coreclr/tools/superpmi/superpmi/commandline.cpp | Updates help text and command-line validation to accept wasm/wasm32/wasm64 as target values |
| src/coreclr/tools/superpmi/superpmi/superpmi.cpp | Adds string-to-enum mapping for "wasm"/"wasm32" → WASM32 and "wasm64" → WASM64 |
| src/coreclr/tools/superpmi/superpmi/jitinstance.cpp | Refactors switch from IMAGE_FILE_MACHINE constants to CORINFO_ARCH constants and adds CORINFO_ARCH_WASM32 case |
|
@dotnet/jit-contrib PTAL Also a bit of support for Wasm64. Running (as jit) on a subset of codegen bring up tests: Failures (not shown) are mainly for tests with calls/byrefs/casts/unordered compares. |
|
Odd that CI skips superpmi runs for changes to superpmi sources. Probably need to adjust some triggers somewhere. |
|
/azp run runtime-coreclr superpmi-replay |
|
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
adamperlin
left a comment
There was a problem hiding this comment.
This looks good to me!
|
Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara |
Allow passing
-target wasmwhen using a Wasm cross-jit.